<?php 
if ($this->pageCount > 1): 
	if (isset($this->previous)): 
		if(isset($this->sel)){
			$firstUrl = $this->url(array('page' => $this->first, 'keyword'=>$this->keyword, 'projectId' => $this->projectId, 'categoryId' => $this->categoryId, 'status' => $this->status, 'ownerId' => $this->ownerId));
		}elseif(isset($this->history)){
			$firstUrl = $this->url(array('page' => $this->first, 'startDate'=>$this->startDate, 'endDate' => $this->endDate,'sltFill_add'=>$this->sltFill_add,'sltFill_project'=>$this->sltFill_project,'sltFill_category'=>$this->sltFill_category));
		}elseif(isset($this->serverfree)){
			$firstUrl = $this->url(array('page' => $this->first, 'project_34' => $this->project_34, 'project_38' => $this->project_38, 'project_47' => $this->project_47));
		}else{
			$firstUrl = $this->url(array('page' => $this->first));
		}
?>
<a href="<?php echo $firstUrl; ?>" class="text">First</a>
<?php else: ?>
<a class="text disabled">First</a>
<?php endif; ?>
 
<!-- Previous page link -->
<?php if (isset($this->previous)): 
		if(isset($this->sel)){
			$preUrl = $this->url(array('page' => $this->previous, 'keyword'=>$this->keyword, 'projectId' => $this->projectId, 'categoryId' => $this->categoryId, 'status' => $this->status, 'ownerId' => $this->ownerId));
		}elseif(isset($this->history)){
			$preUrl = $this->url(array('page' => $this->previous, 'startDate'=>$this->startDate, 'endDate' => $this->endDate,'sltFill_add'=>$this->sltFill_add,'sltFill_project'=>$this->sltFill_project,'sltFill_category'=>$this->sltFill_category));
		}else if(isset($this->serverfree)){
			$preUrl = $this->url(array('page' => $this->previous, 'project_34' => $this->project_34, 'project_38' => $this->project_38, 'project_47' => $this->project_47));
		}else{
			$preUrl = $this->url(array('page' => $this->previous));
		}
?>
  <a href="<?php echo $preUrl; ?>" class="text">&lt; Previous</a>
<?php else: ?>
<a class="text disabled">&lt; Previous</a>
<?php endif; ?>
  
<!-- Numbered page links -->
<?php foreach ($this->pagesInRange as $page): ?>
<?php if ($page != $this->current): 
		if(isset($this->sel)){
			$currUrl = $this->url(array('page' => $page, 'keyword'=>$this->keyword, 'projectId' => $this->projectId, 'categoryId' => $this->categoryId, 'status' => $this->status, 'ownerId' => $this->ownerId));
		}elseif(isset($this->history)){
			$currUrl = $this->url(array('page' => $page, 'startDate'=>$this->startDate, 'endDate' => $this->endDate,'sltFill_add'=>$this->sltFill_add,'sltFill_project'=>$this->sltFill_project,'sltFill_category'=>$this->sltFill_category));
		}else if(isset($this->serverfree)){
			$currUrl = $this->url(array('page' => $page, 'project_34' => $this->project_34, 'project_38' => $this->project_38, 'project_47' => $this->project_47));
		}else{
			$currUrl = $this->url(array('page' => $page));
		}
  ?>
    <a href="<?php echo $currUrl; ?>"><?php echo $page; ?></a>
  <?php else: ?>
    <a  class="currentPage"><?php echo $page; ?></a>
  <?php endif; ?>
<?php endforeach; ?>
 
<!-- Next page link -->
<?php if (isset($this->next)): 
		if(isset($this->sel)){
			$nextUrl = $this->url(array('page' => $this->next, 'keyword'=>$this->keyword, 'projectId' => $this->projectId, 'categoryId' => $this->categoryId, 'status' => $this->status, 'ownerId' => $this->ownerId));
		}elseif(isset($this->history)){
			$nextUrl = $this->url(array('page' => $this->next, 'startDate'=>$this->startDate, 'endDate' => $this->endDate,'sltFill_add'=>$this->sltFill_add,'sltFill_project'=>$this->sltFill_project,'sltFill_category'=>$this->sltFill_category));
		}else if(isset($this->serverfree)){
			$nextUrl = $this->url(array('page' => $this->next, 'project_34' => $this->project_34, 'project_38' => $this->project_38, 'project_47' => $this->project_47));
		}else{
			$nextUrl = $this->url(array('page' => $this->next));
		}
?>
  <a href="<?php echo $nextUrl; ?>" class="text"> Next &gt;</a>
<?php else: ?>
  <a  class="text disabled">Next &gt;</a>
<?php endif; ?>
 
<!-- Last page link -->
<?php if (isset($this->next)): 
		if(isset($this->sel)){
			$lastUrl = $this->url(array('page' => $this->last, 'keyword'=>$this->keyword, 'projectId' => $this->projectId, 'categoryId' => $this->categoryId, 'status' => $this->status, 'ownerId' => $this->ownerId));
		}elseif(isset($this->history)){
			$lastUrl = $this->url(array('page' => $this->last, 'startDate'=>$this->startDate, 'endDate' => $this->endDate,'sltFill_add'=>$this->sltFill_add,'sltFill_project'=>$this->sltFill_project,'sltFill_category'=>$this->sltFill_category));
		}elseif(isset($this->serverfree)){
			$lastUrl = $this->url(array('page' => $this->last, 'project_34' => $this->project_34, 'project_38' => $this->project_38, 'project_47' => $this->project_47));
		}else{
			$lastUrl = $this->url(array('page' => $this->last));
		}
?>
<a href="<?php echo $lastUrl; ?>" class="text">Last</a>
<?php else: ?>
<a  class="text disabled">Last</a>
<?php endif; ?>
<?php endif; ?>